php pass a variabele to js

57

php pass a variabele to js -

<script>
'var name = <?php echo json_encode($name); ?>;
</script>'

Comments

Submit
0 Comments